package com.flat.paas.portal.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.flat.paas.portal.domain.Dictionaries;
import com.flat.paas.portal.domain.DictionariesKey;
import com.flat.paas.portal.persistence.DictionariesMapper;
import com.flat.paas.portal.service.DictionariesService;

@Service
public class DictionariesServiceImpl implements DictionariesService{
	@Resource
	DictionariesMapper dictionariesMapper;

	@Override
	public int deleteByPrimaryKey(DictionariesKey key) {
		return dictionariesMapper.deleteByPrimaryKey(key);
	}

	@Override
	public int insert(Dictionaries record) {
		try {
			dictionariesMapper.insert(record);
			return 1;
		} catch (Exception e) {
			
			throw e;
		}
	}

	@Override
	public int insertSelective(Dictionaries record) {
		 try {
			dictionariesMapper.insertSelective(record);
			return 1;
		} catch (Exception e) {
			throw e;
		}
	}

	@Override
	public Dictionaries selectByPrimaryKey(DictionariesKey key) {
		// TODO Auto-generated method stub
		return dictionariesMapper.selectByPrimaryKey(key);
	}

	@Override
	public int updateByPrimaryKeySelective(Dictionaries record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(Dictionaries record) {
		// TODO Auto-generated method stub
		return dictionariesMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Dictionaries> queryDictionaries() {
		// TODO Auto-generated method stub
		return null;
	}

}
